﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using FtpLib;

namespace Plugin.FTPClient
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            /*
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());
             * */
            FtpJob();
        }

        static void FtpJob()
        {
            FtpConnection ftp = new FtpConnection();
            ftp.Host = "124.42.10.226";
            ftp.Port = 21;
            ftp.Username = "dhsync";
            ftp.Password = "DongHai.0218!13";
            ftp.Open();
            ftp.Login();
            ftp.SetCurrentDirectory("/dhsync/");
            ftp.GetFile("stockprice.data", "stockprice.data", true);
            
            ftp.GetFile("indexprice.data", "indexprice.data", true);
            ftp.Close();
        }
    }
}
